<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use app\middleware\Auth;
use app\middleware\Login;
use think\facade\Route;


Route::group(function () {
	Route::miss(function() {
		return '404 Not Found!';
	});
	
	Route::group('Config',function () {
		Route::get('getPrivacyPolicy', 'config/getPrivacyPolicy');
		Route::get('getUserAgreement', 'config/getUserAgreement');
		Route::get('getServiceTime', 'config/getServiceTime');
		Route::get('getDelayDay', 'config/getDelayDay');
	});
	
	Route::group('/',function () {
		Route::any('/', 'Index/index');
	});
	
	Route::group('Notify',function () {
		Route::any('returnNotify', 'Notify/returnNotify');
		Route::any('withdrawNotify', 'Notify/withdrawNotify');
	});
	
	Route::group('Sms',function () {
		Route::post('send', 'Sms/send');
	});
	
	Route::group('User',function () {
		Route::post('login', 'User/login');
		Route::post('register', 'User/register');
		Route::post('resetpwd', 'User/resetpwd');
		Route::post('refund', 'User/refund');
	});
	
	Route::group('Line',function () {
		Route::get('tags', 'Line/tags');
		Route::get('line', 'Line/line');
		Route::get('list', 'Line/list');
		Route::get('detail', 'Line/detail');
		Route::get('assessList', 'Line/assessList');
	});
	
	#需要登陆
	Route::group(function () {

		Route::group('User',function () {
			Route::get('getUserInfo', 'User/getUserInfo');
			Route::post('vipRenew', 'User/vipRenew');
			Route::get('getQRCode', 'User/getQRCode');
			Route::post('withdraw', 'User/withdraw');
			Route::get('withdrawList', 'User/withdrawList');
			Route::post('resetTradepwd', 'User/resetTradepwd');
			Route::get('team', 'User/team');
			Route::post('closeTradepwd', 'User/closeTradepwd');
			Route::post('userEdit', 'User/userEdit');
			Route::get('userMoney', 'User/userMoney');
			Route::post('changeMobile', 'User/changeMobile');
			Route::get('collect', 'User/collect');
			Route::get('coupon', 'User/coupon');
		});
		
		Route::group('Sms',function () {
			Route::post('verifyTradepwdSms', 'Sms/verifyTradepwdSms');
			Route::post('verifyMobile', 'Sms/verifyMobile');
		});
		
		Route::group('Bank',function () {
			Route::get('bank', 'Bank/bank');
			Route::post('addBank', 'Bank/addBank');
			Route::post('deleteBank', 'Bank/deleteBank');
			Route::get('bankList', 'Bank/bankList');
			Route::post('editBank', 'Bank/editBank');
			Route::get('detail', 'Bank/detail');
		});
		
		Route::group('Line',function () {
		
			Route::post('confirmOrder', 'Line/confirmOrder');
			Route::post('checkCoupon', 'Line/checkCoupon');
			Route::get('couponList', 'Line/couponList');
			Route::post('receiveCoupon', 'Line/receiveCoupon');
			Route::post('createOrder', 'Line/createOrder');
			Route::post('orderPay', 'Line/orderPay');
			Route::get('orderList', 'Line/orderList');
			Route::get('orderDetail', 'Line/orderDetail');
			Route::post('orderCancel', 'Line/orderCancel');
			Route::post('orderDelete', 'Line/orderDelete');
			Route::post('orderRefundDeposit', 'Line/orderRefundDeposit');
			Route::post('orderAssess', 'Line/orderAssess');
			Route::post('collect', 'Line/collect');
		});
		
		Route::group('Advise',function () {
			Route::post('adviseAdd', 'Advise/adviseAdd');
			Route::get('class', 'Advise/class');
		});
		
		Route::group('Vip',function () {
			Route::get('index', 'Vip/index');
			Route::post('createOrder', 'Vip/createOrder');
		});
		
		
	})->middleware(Login::class);
	
	
})->middleware([Auth::class])->allowCrossDomain();

